<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
	<h1 v-text="msg" ref="title" class="red"></h1>
	<button ref="btn" @click="showDom">点我输出上方的DOM元素</button>
	<school ref="sch"></school>
	<student name="重八" sex="男"></student>
  </div>
</template>

<script>
import school from './components/School'
import student from './components/Student'

export default {
  name: 'App',
  components: {
	  school:school,
	  student:student
  },
  data(){
	return {
		msg:'欢迎学习Vue!'
	}  
  },
  methods:{
	  showDom(){
		  console.log(this.$refs.title)
		  console.log(this.$refs.btn)
		  console.log(this.$refs.sch)
	  }
  }
}
</script>

<style lang="less" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.red{color: red;}
</style>
